[neural search][fix bug of evaluate.py] #7832
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
hi there:
this chunk of code read a txt file line by line. And spliting the recall cases by the recall num. However, this chunk of code does not consider the last recall results. So, to fix it, have to add one more append function once the file is reading complete.
您好,
这段代码存在一个bug,这段代码按照recall num来进行按行读取数据,但是最后的一块召回结果并未被记录。举个例子,一个8行的txt和recall_num 2,这段代码只能够读取2,4,6行数据的召回结果,7和8的结果被丢掉了。为了修复这个bug, 可以在循环外再apped一次